{{template "frame_top"}}
<link rel="stylesheet" href="/static/home/layui/layui/css/layui.css"  media="all">
<div class="container-fluid p-t-15">
  <div class="row">
    <div class="col-lg-12">
      <div class="card">
        <div class="card-body">
          <div class="edit-avatar js-upload-image">
            <img src="{{.Avatar}}" alt="{{.Username}}" class="img-avatar" id="file_list_one_pic">
            <div class="avatar-divider"></div>
            <div class="edit-avatar-content">
              <button class="btn btn-default" id="picker_one_pic" style="margin-bottom: 5px;">修改头像</button>
              <p class="m-0">选择一张你喜欢的图片，上传图片大小不能超过2M。</p>
            </div>
          </div>
          <hr>
          <form class="site-form layui-form" id="pro_form">
            <div class="form-group">
              <label for="username">用户名</label>
              <input type="text" class="form-control" value="{{.Username}}" disabled="disabled" />
            </div>
            <div class="form-group">
              <label for="nickname">昵称</label>
              <input type="text" class="form-control" lay-verify="required" name="nickname" id="nickname" placeholder="输入您的昵称" value="{{.Nickname}}">
            </div>
            <div class="form-group">
              <label for="email">邮箱</label>
              <input type="email" class="form-control" lay-verify="email" name="email" id="email" aria-describedby="emailHelp" placeholder="请输入正确的邮箱地址" value="{{.Email}}">
              <small id="emailHelp" class="form-text text-muted">请保证您填写的邮箱地址是正确的。</small>
            </div>
            <div class="form-group">
              <label for="email">空间容量 {{.UsedMem}} / {{.Memory}}</label>
              <div class="progress">
                <div class="progress-bar" role="progressbar" style="width: {{.UsedPer}}%;" aria-valuenow="{{.UsedPer}}" aria-valuemin="0" aria-valuemax="100">
                  {{.UsedPer}}%
                </div>
              </div>
              <small id="emailHelp" class="form-text text-muted">空间不足可以点击左侧扩容进行容量扩充。</small>
            </div>

            <button type="button" lay-submit lay-filter="submitForm" class="btn btn-primary">保存</button>
{{/*            <button type="button" id="pro_sub"  class="btn btn-primary" onclick="submitForm()">保存</button>*/}}
          </form>
 
        </div>
      </div>
    </div>
    
  </div>
  
</div>
{{template "frame_js"}}
<script src="/static/admin/js/bootstrap-notify.min.js"></script>
<script type="text/javascript" src="/static/admin/js/lightyear.js"></script>
<script src="/static/home/layui/layui/layui.js" charset="utf-8"></script>
<script src="/static/admin/js/validate_profile.js" charset="utf-8"></script>
<script>
  layui.use(['form', 'layedit', 'laydate'], function(){
    var form = layui.form,layer = layui.layer;
    //监听提交
    form.on('submit(submitForm)', function(data){
      submitForm();
      return false;
    });
  });
</script>
</body>
</html>